/*******************************************************************************
 * Copyright (c) 2000, 2010 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.karelun.whiteboard.gef;

import java.util.List;

import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.common.command.Command;

public interface EditPart extends IAdaptable {

	int SELECTED_NONE = 0;

	int SELECTED = 1;

	int SELECTED_PRIMARY = 2;

	void activate();

	void addEditPartListener(EditPartListener listener);

	void addNotify();

	void deactivate();

	void eraseSourceFeedback(Request request);

	void eraseTargetFeedback(Request request);

	List getChildren();

	Command getCommand(Request request);

	DragTracker getDragTracker(Request request);

	EditPolicy getEditPolicy(Object key);

	Object getModel();

	EditPart getParent();

	RootEditPart getRoot();

	int getSelected();

	EditPart getTargetEditPart(Request request);

	EditPartViewer getViewer();

	boolean hasFocus();

	void installEditPolicy(Object role, EditPolicy editPolicy);

	boolean isActive();

	boolean isSelectable();

	void performRequest(Request request);

	void refresh();

	void removeEditPartListener(EditPartListener listener);

	void removeEditPolicy(Object role);

	void removeNotify();

	void setFocus(boolean hasFocus);

	void setModel(Object model);

	void setParent(EditPart parent);

	void setSelected(int value);

	void showSourceFeedback(Request request);

	void showTargetFeedback(Request request);

	boolean understandsRequest(Request request);

}
